import django
import sys
import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", 'public.settings')
django.setup()

from apps.service.models import Sku
import random

for item in Sku.objects.all():
    number = random.choice([0, 0, 0, 1, 1, 2])
    if number:
        item.likes += number
        item.save()